package com.zzl.boot.bigevent.validation;

import com.zzl.boot.bigevent.anno.State;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;

public class sateValidation implements ConstraintValidator<State,String> {
    @Override
    public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
        System.out.println(s);
        if(s==null) return false;
        if(s.equals("已发布")||s.equals("草稿")) return true;
        return false;
    }
}
